package com.example.bdd.demo.pages;

import com.example.bdd.demo.base.BddBaseService;
import com.example.bdd.demo.intf.PageAction;
import com.example.bdd.demo.model.BddAutoFillData;
import org.openqa.selenium.By;

public class Page1Service implements PageAction<BddAutoFillData> {

    private BddBaseService service;

    public Page1Service(BddBaseService service){
        this.service = service;
    }

    @Override
    public void setFields(BddAutoFillData bddData) {
        service.selectRadio(By.name("name"), 0);
    }

    public void clickBaidu() {
        service.toOpenLink(By.id("baidu"));
    }

    public void closeBaidu() {
        service.closePage(false);
    }

}
